class LinkedList(val h: Any, val t: LinkedList) {
  def EmptyList = (h == null && t == null)
  def LengthList: Int = if (EmptyList) 0 else 1 + t.LengthList
  override def toString: String = if (EmptyList) "" else h + " " + t
}

//Basic Program to make Linked List